/*
 * Created on 2005-11-15
 *
 */
package com.yl.cap.analyst.work.task.file;

import java.io.File;

import com.yl.cap.analyst.config.ContextBean;
import com.yl.cap.analyst.util.Tools;

public class BackupFile implements FinishedFile
{

    public void addressFile(String fileName) throws Exception
    {
        int pos = fileName.lastIndexOf(File.separator);
        String shortName = fileName.substring(pos+1,fileName.length());
        StringBuffer sb = new StringBuffer();
        sb.append(ContextBean.rootPath);
        sb.append(File.separator);
        sb.append("conf");
        sb.append(File.separator);
        sb.append("backuptask");
        sb.append(File.separator);
        sb.append(shortName);
        Tools.moveFile(fileName,sb.toString());
    }

}
